import pytest

"""
预期的顺序：
1、登录
2、添加购物车
3、下单
"""
"""@pytest.mark.run(order=-2)
def test_add_cart():
    print("添加购物车")
@pytest.mark.run(order=-1)
def test_login():
    print("登录")
@pytest.mark.run(order=-3)
def test_xd():
    print("下单")"""

"""
pytest的执行顺序，按照定义好的顺序去执行
"""


# 失败重跑
# reruns=5，失败重跑的次数
# reruns_delay=2，每次失败间隔几秒
"""@pytest.mark.flaky(reruns=5, reruns_delay=2)
def test_add_cart1():
    assert False == True"""
"""
def test_add_cart1():
    assert False == True"""

# pytest .\06_常用插件扩展.py --reruns 5 --reruns-delay 2





